package com.atguigu.inherited;

public class TestRectangle {
    public static void main(String[] args) {
        Rectangle r1 = new Rectangle();
        r1.setName("矩形");//方法从父类继承的，属性也是父类继承
        r1.setLength(9);
        r1.setWidth(6);

        Rectangle r2 = new Rectangle("长方形",8,6);

    }
}
